package com.smh.yunpicturebackend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smh.yunpicturebackend.pojo.domain.Picture;
import com.smh.yunpicturebackend.pojo.dto.space.analyze.SpaceCategoryAnalyzeDto;
import com.smh.yunpicturebackend.pojo.dto.space.analyze.SpacePeriodAnalyzeDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author shiminghui
* @description 针对表【picture(图片)】的数据库操作Mapper
* @createDate 2025-06-19 23:38:23
* @Entity com.smh.yunpicturebackend.pojo.domain.Picture
*/
public interface PictureMapper extends BaseMapper<Picture> {

    List<Picture> searchPictureByColor(@Param("red") Integer red, @Param("green") Integer green, @Param("blue") Integer blue, @Param("spaceId") Long spaceId);

    void editPictureByBatch(@Param("spaceId") Long spaceId, @Param("pictureIdList") List<Long> pictureIdList, @Param("category") String category, @Param("nameRule") String nameRule, @Param("tagString") String tagString);

    List<SpaceCategoryAnalyzeDto> selectCountAndTotalSizeGroupByCategory(@Param("spaceId") Long spaceId, @Param("isAllQuery") boolean isAllQuery);

    List<SpacePeriodAnalyzeDto> selectCountGroupByPeriod(@Param("userId") Long userId, @Param("spaceId") Long spaceId, @Param("timeDimension") String timeDimension, @Param("isAllQuery") boolean queryAll);
}
